﻿function MessagesBarControl(barId) {
    var self = this;

    self.barId = barId;

    self.refreshButtonSelector = '#refresh-button-' + self.barId;

    self.deleteButtonSelector = '#delete-button-' + self.barId;

    self.writeNewMessageButtonSelector = '#write-button-' + self.barId;

    $(self.refreshButtonSelector).click(function () {
        alert('refresh button!');
    });

    $(self.deleteButtonSelector).click(function () {
        alert('delete button!');
    });

    $(self.writeNewMessageButtonSelector).click(function () {
        alert('new message button!');
    });

}